package com.yang.ddd.domain.space.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yang.ddd.domain.space.entity.Space;
import com.yang.ddd.domain.space.entity.SpaceLevel;
import com.yang.ddd.domain.user.entity.User;
import com.yang.ddd.interfaces.dto.space.SpaceAddRequest;
import com.yang.ddd.interfaces.dto.space.SpaceQueryRequest;
import com.yang.ddd.interfaces.vo.space.SpaceVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Set;


/**
 * @author Young
 * @description 针对表【space(图片)】的数据库操作Service
 * @createDate 2025-04-01 23:25:31
 */
public interface SpaceDomainService {
    Wrapper<Space> getQueryWrapper(SpaceQueryRequest spaceQueryRequest);

    boolean save(Space space);

    boolean isExists(Long userId, Integer spaceType);


    Space getById(Long spaceId);


    List<Space> list(QueryWrapper<Space> queryWrapper);


    List<Space> listByIds(Set<Long> spaceIdSet);

    /**
     *
     * @param finalSpaceId 空间id
     * @param picSize  更新大小
     * @param b true：消耗额度空间 false：增加额度空间
     * @return
     */
    boolean updateQuota(Long finalSpaceId, Long picSize, boolean b);

    Page<Space> listSpaceByPage(SpaceQueryRequest spaceQueryRequest);

    Page<SpaceVO> listSpaceVOByPage(SpaceQueryRequest spaceQueryRequest);

    List<SpaceLevel> listSpaceLevel();

    Boolean removeById(long id);

    boolean updateById(Space space);

}
